#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include "Service.h"
#include "Private.h"

/// <summary>
/// Main Entry
/// </summary>
int main (int argc, char *argv[])
{
	printf("Startup ...\n");
	//printf("PID: %d\n", getpid());
	//execv("/bin/ls", NULL);
	
	//Booting();

	setenv("RUNLEVEL", "0", 1);
	setenv("PATH", "/System/Bin:/System/Shell", 1);
	setenv("LD_LIBRARY_PATH", "/Librarys", 1);
	setenv("CONSOLE", "/dev/console", 1);

	SignalsInit();

	StartShell();

	//ServiceStart("/bin/sh");

	//ServiceStart("/bin/uname");

	for (;;) {
	    if (SignalsWait() == -1)
	    	continue;
	    continue;
	}

	return 1;
}
